/*
 * @Descripttion: useReducer自动导入模块, 条件：reduce, state子文件额外配置name/state，参照现有模板
 * @version: 
 * @Author: spring
 * @Date: 2022-04-16 22:58:24
 * @LastEditors: spring
 * @LastEditTime: 2022-04-18 20:44:57
 */

import combineReducers from "./combine";
import mergeModuls from "./mergeModuls";
//- vite
const reducerModule = import.meta.globEager("./reduce/*.ts");
const stateModule =  import.meta.globEager("./state/*.ts")

export let multipleState = mergeModuls(stateModule, 'state');
let multipleReducer = mergeModuls(reducerModule, 'reducer');

const reducer = combineReducers(multipleReducer)

export default {
  reducer,
  multipleState
}